﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RbacPermissionSystem.Application.Admins.Dto
{
    public class RegisterDto
    {
        /// <summary>        
        /// 用户名
        /// </summary>
        public string UserName { get; set; }
        /// <summary>        
        /// 密码
        /// </summary>
        public string Password { get; set; }
        /// <summary>
        /// 验证码
        /// </summary>
        public string ValidateCode { get; set; }
    }

    public class AdminCreateDto
    {
        /// <summary>        
        /// 用户名
        /// </summary>
        [StringLength(50)]
        public string UserName { get; set; }
        /// <summary>        
        /// 密码
        /// </summary>
        [Required]
        [StringLength(50)]
        public string Password { get; set; }
        /// <summary>        
        /// 确认密码
        /// </summary>
        [Required]
        [Compare("Password",ErrorMessage = "两次密码不一致")]
        public string ConfirmPassword { get; set; }
        /// <summary>        
        /// 姓名
        /// </summary>
        [StringLength(50)]
        public string FullName { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        [StringLength(50)]
        public string Email { get; set; }
        /// <summary>
        /// 头像
        /// </summary>
        [StringLength(500)]
        public string Avatar { get; set; }
    }

    public class AdminUpdateDto
    {
        public int AdminId { get; set; }
        /// <summary>        
        /// 用户名
        /// </summary>
        [StringLength(50)]
        public string UserName { get; set; }
        /// <summary>        
        /// 姓名
        /// </summary>
        [StringLength(50)]
        public string FullName { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        [StringLength(50)]
        public string Email { get; set; }
        /// <summary>
        /// 头像
        /// </summary>
        [StringLength(500)]
        public string Avatar { get; set; }
    }


        public class LoginDto
    {
        /// <summary>        
        /// 用户名
        /// </summary>
        public string UserName { get; set; }
        /// <summary>        
        /// 密码
        /// </summary>
        public string Password { get; set; }
        /// <summary>
        /// 验证码
        /// </summary>
        public string ValidateCode { get; set; }
    }
}
